namespace CSharpPro;


using System;

class Demo0922
{
    public static void Demo1()
    {
        Console.Write("请输入年份：");

        int year = int.Parse(Console.ReadLine());
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
        {
            Console.WriteLine($"{year} 年是闰年");
        }
        else
        {
            Console.WriteLine($"{year} 年不是闰年");
        }
    }


    //判断闰年
//1.能被4整除，并且不能被100整除
//2.能被400整除


    public static void Demo2()
    {
        double price = 8800;
        double hangprice = 0, dongprice = 0;
        Console.WriteLine("请输入月份:");
        int month = int.Parse(Console.ReadLine());
        switch (month)
        {
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
                hangprice = price * 0.9;
                dongprice = price * 0.75;
                break;
            case 1:
            case 2:
            case 3:
            case 4:
            case 11:
            case 12:
                hangprice = price * 0.6;
                dongprice = price * 0.3;
                break;
        }

        Console.WriteLine($"航班出行的价格为{hangprice}");
        Console.WriteLine($"动车出行的价格为{dongprice}");
    }
}